const express = require('express')
const router = express.Router()
const { upload } = require('../control/upload')
const uploadSingleMiddleware = require('../middlewares/uploadSingle')
const uploadArrayMiddleware = require('../middlewares/uploadArray')

// 文件上传
router.post('/upload', uploadSingleMiddleware, upload)

// 多文件上传
router.post('/upload/batch', uploadArrayMiddleware, upload)

module.exports = router
